package com.yitiao.multithread.case02;

/**
 * <h3>stop 可以轻质强制中断线程，并释放锁</h3>
 */
public class StopThread {



    public static void main(String[] args) throws InterruptedException {
        Thread testThread = new Thread(new ThreadType.TestThread());
        testThread.start();
        Thread testThreadWithSync = new Thread(new ThreadType.TestThreadWithSync());
        testThreadWithSync.start();
        Thread testThreadWithLock = new Thread(new ThreadType.TestThreadWithLock());
        testThreadWithLock.start();

        Thread.sleep(1000);
        testThread.stop();
        testThreadWithSync.stop();
        testThreadWithLock.stop();

    }
}
